import java.security.Permission;

/**
 * SecurityManager在Jdk17后被弃用
 */
public class DefaultSecurityManager extends SecurityManager {
    /**
     * 检测所有的权限
     * @param perm   the requested permission.
     */
    @Override
    public void checkPermission(Permission perm) {
        System.out.println("默认不做任何权限限制");
        // super.checkPermission(perm);
        throw new SecurityException("权限不足" + perm.getActions());
    }
}
